{$header} 
{literal}
<script type="text/javascript" language="javascript">
	function getXMLHTTP() { //fuction to return the xml http object
        var xmlhttp=false;    
        try{
            xmlhttp=new XMLHttpRequest();
        }
        catch(e)    {        
            try{            
                xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(e){
                try{
                req = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch(e1){
                    xmlhttp=false;
                }
            }
        }

        return xmlhttp;
    }


    function getcate(strURL)
    {       
     var req = getXMLHTTP(); // fuction to get xmlhttp object
     if (req)
     {
      req.onreadystatechange = function()
     {
      if (req.readyState == 4) { //data is retrieved from server
       if (req.status == 200) { // which reprents ok status                    
         document.getElementById('citydiv').innerHTML=req.responseText;
      }
      else
      { 
         alert("There was a problem while using XMLHTTP:\n");
      }
      }            
      }        
    req.open("GET", strURL, true); //open url using get method
    req.send(null);
     }
    }

</script>
{/literal}
{$menu}
{$tiny}

<div id="content">
    <div id="tab" class="radius-top">
    	Hotel info &gt;&gt; Add
        <div class="clear"></div></div>
		{$form_open}             
        <table>
              <tbody>
               <tr>
                  <td align="left">Status&nbsp;<span class="errors">*</span></td>
                  <td class="hotelInfo">
                  <input type="radio" checked="" value="1" name="status">
                  Active<input type="radio" value="0" name="status">Inactive <span class="errors">{$errorstatus}</span></td>
                </tr>
                <tr>
                  <td align="left">Category&nbsp;<span class="errors">*</span></td>
                  <td class="hotelInfo">
                  <select name="category" onChange="getcate('{$url}manage_room/subcate/'+this.value)">
                    {$str_cate}
                   </select>
                   <span class="errors">{$errorcate}</span>
                  </td>
                </tr>
               <!-- <tr>
                  <td align="left">Subcategory&nbsp;<span class="errors"></span></td>
                  <td class="hotelInfo">
                   <div id="citydiv">
                     <select name="subcate">
                     	{$str_subcate}
                     </select>
                     <span class="errors">{$errorsubcate}</span>    
 					</div
                  ></td>
                </tr>-->
                <tr>
                  <td align="left">Category Name En&nbsp;<span class="errors">*</span></td>
                  <td class="hotelInfo"><label for="txtCategory"></label>
                  <input type="text" name="title_en" id="txtCategory" value="{$title_en}" /><span class="errors">{$errortitle_en}</span></td>
                </tr>
                 <tr>
                  <td align="left">Category Name Cn</td>
                  <td class="hotelInfo"><label for="txtCategory"></label>
                  <input type="text" name="title_cn" id="txtCategory" value="{$title_cn}" /></td>
                </tr>
                 <tr>
                  <td align="left">Category Name Th</td>
                  <td class="hotelInfo"><label for="txtCategory"></label>
                  <input type="text" name="title_th" id="txtCategory" value="{$title_th}" /></td>
                </tr>
                 <tr>
                   <td align="left" valign="top">Description En</td>
                   <td class="hotelInfo">
                    <textarea  id="elm1" name="desc_en" cols="45" rows="5">{$desc_en}</textarea>
                    <span class="errors">{$errordesc_en}</span>
                   </td>
                 </tr>
                 <tr>
                   <td align="left" valign="top">Description Cn</td>
                   <td class="hotelInfo"><textarea  id="elm2" name="desc_cn" cols="45" rows="5">{$desc_cn}</textarea></td>
                 </tr>
                 <tr>
                   <td align="left" valign="top">Description Th</td>
                   <td class="hotelInfo"><textarea  id="elm3" name="desc_th" cols="45" rows="5">{$desc_th}</textarea></td>
                 </tr>
                 <tr>
                   <td align="left">Picture&nbsp;(800x250)</td>
                   <td class="hotelInfo">
                   <input type="file" name="pic" id="textfield" />
                   <span class="errors">{$errorpic}</span>
                   </td>
                 </tr>
              </tbody>
            </table>
            <div id="bnt" class="mws-form-row">
                <input type="submit"  name="bntSubmit" class="mws-button green" value="Save"  />
                <input type="button" name="bntSubmit" class="mws-button green" value="Cancel" onClick="window.location='{$url}manage_room/front_room_list';" />
          </div>
		{$form_close}
  </div>
  {$footer}